//
//  main.cpp
//  MachineLearning
//
//  Created by Mark Lord on 2013-06-15.
//  Copyright (c) 2013 Mark Lord. All rights reserved.
//

#include <iostream>
#include <boost/foreach.hpp>
#include <boost/shared_ptr.hpp>
#include <IO/delimitedfilereader.h>

int main(int argc, const char * argv[])
{
    DelimitedFileReader reader("/usr/data/tennis.data", ",");

    reader.readAll();
    boost::shared_ptr<std::vector<Record>> recs = reader.getAll();
    typedef std::vector<std::string> Record;
    BOOST_FOREACH(Record &rec, *recs)
    {
        BOOST_FOREACH(std::string &val, rec)
        {
            std::cout << val << ",";
        }
        std::cout << std::endl;
    }
    
    return 0;
}

